home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / PPATH.PS < prev    next >
Text File  |  1991-11-25  |  756b  |  27 lines

  1. % Redefine pathforall for tracing.
  2. % Can't be used recursively.
  3.  
  4. /# {( )print} def
  5.  
  6. /-pathforall /pathforall load def
  7. /-dict 5 dict def
  8.  
  9. /pathforall
  10.  { -dict begin
  11.    /-close exch def  /-curve exch def  /-line exch def  /-move exch def
  12.    end
  13.    {2 copy exch =only # =only ( moveto\n)print   -dict /-move get exec}
  14.    {2 copy exch =only # =only ( lineto\n)print   -dict /-line get exec}
  15.    {6 copy 6 -1 roll =only # 5 -1 roll =only #
  16.     4 -1 roll =only # 3 -1 roll =only # exch =only # =only ( curveto\n)print
  17.     -dict /-curve get exec}
  18.    {(closepath\n)print   -dict /-close get exec}
  19.    -pathforall flush
  20.   }
  21.  def
  22.  
  23. % Just print the current path
  24.  
  25. /printpath
  26.  { {pop pop} {pop pop} {pop pop pop pop pop pop} {} pathforall } def
  27.